Carbon


SetEntryUsage

Header: Palettes.h Carbon status: Supported

Modifies the usage category and tolerance values of a palette entry.

void SetEntryUsage (
    PaletteHandle dstPalette, 
    SInt16 dstEntry, 
    SInt16 srcUsage, 
    SInt16 srcTolerance
);
Parameter descriptions
dstPalette

A handle to the palette to be modified.

dstEntry

The palette entry.

srcUsage

The new usage value; one or more usage constants.

srcTolerance

The new tolerance value.

DISCUSSION

SetEntryUsage marks the entry as having changed, but it does not change the color environment. That change occurs upon the next call to ActivatePalette. Modified entries are marked such that the palette is updated even though no update is required by a change in the color environment. If either srcUsage or srcTolerance is set to $FFFF (–1), the entries are not changed.

This function allows you to easily modify a palette created with NewPalette or modified by CTab2Palette. For such palettes the ciUsage and ciTolerance fields of the ColorInfo structure are the same because you can designate only one value for each. You typically call SetEntryUsage after NewPalette or CTab2Palette to adjust and customize your palette.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)